<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <title>App1</title>
    <style>
        html,
        body {
            height: 100%;
            margin: 0;
            padding: 0;
        }
        .container1 {
            height: 10%;
            background-image: linear-gradient(to right, #a2a2ec, #d2dee4);
        }
        .container2 {
            height: 90%;
            background-image: linear-gradient(to right, #cfcfe9, #cfd8de);
        }
        .header1 {
            font-size: 31px;
            font-weight: bold;
            text-align: center;
            line-height: 60px;
        }



        .loginText {
            text-align: center;
        }

    </style>
</head>

<body>
<div class="container1">
    <div class="header1"> Welcome to App1</div>

</div>
<div class="container2">
    <div class="loginText">
            <span>
                <a th:if="${session.loginUser == null}"
                   href="http://localhost:8088/view/login?target=http://localhost:8081/view/index">登陆</a>
                <a th:unless="${session.loginUser == null}"
                   href="http://localhost:8088/loginout?target=http://localhost:8081/view/index">退出</a>
            </span>

        <p th:unless="${session.loginUser == null}">
            <span style="color: blueviolet;" th:text="${session.loginUser.username}"></span>已登录
        </p>

    </div>

</div>

</body>

</html>